<template>
    <div>
        添加分类 
        <van-field v-model="from.name" label="名称" placeholder="请输入用户名" />

        <van-button @click="cate_add">添加</van-button>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                from:{}
            }
        },
        methods:{
            cate_add(){
                this.$axios.post('cateM/',this.from).then(res=>{
                    if(res.data.code==200){
                        alert('添加成功')
                    }
                })
            }
        },
    }
</script>

<style scoped>

</style>